extern crate serde;
extern crate serde_json;

use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize, Debug)]
pub struct Wall{
    pub id: i32,
    pub user_uuid :String,
    pub exam_subject_id: i32,
    pub create_time: String,
    pub message:String,
    pub read_num: i32,
    pub comment_num: i32,
    pub avatar_text: String,
    pub nice_name: String,
    pub real_name: String,
    pub is_explicit: i32,  //1,2
    pub name: String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct WallListData{
    pub cur_page:i32,
    pub datas:Option<Vec<Wall>>,
    pub offset:i64,
    pub over:bool,
    pub page_count:i32,
    pub size:i32,
    pub total:i32,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct WallPageData{
    pub data:WallListData,
    pub error_code:i32,
    pub error_msg:String,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct WallReader{
    pub id: i32,
    pub wall_id :i32,
    pub user_uuid: String,
    pub avatar_text: String,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct WallReaderListData{
    pub data:Option<Vec<WallReader>>,
    pub error_code:i32,
    pub error_msg:String,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct WallComment{
    pub id: i32,
    pub wall_id:i32,
    pub user_uuid :String,
    pub comment: String,
    pub create_time: String,
    pub nice_name: String,
    pub real_name: String,
    pub is_explicit: i32,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct WallCommentListData{
    pub cur_page:i32,
    pub datas:Option<Vec<WallComment>>,
    pub offset:i32,
    pub over:bool,
    pub page_count:i32,
    pub size:i32,
    pub total:i32,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct WallCommentPageData{
    pub data:WallCommentListData,
    pub error_code:i32,
    pub error_msg:String,
}
